function player::onLevelLoaded(%this, %scenegraph) {
   $playerVar = %this;
   moveMap.bindCmd(keyboard, "up", "", "goUp();");
   moveMap.bindCmd(keyboard, "left", "", "goLeft();");
   moveMap.bindCmd(keyboard, "right", "", "goRight();");
   moveMap.bindCmd(keyboard, "down", "", "goDown();");   
}

function updateScore() {
	score.text = "45";
}

function goUp() {
	$playerVar.setPositionY($playerVar.getPositionY() - 1);
}
function goLeft() {
	$playerVar.setPositionX($playerVar.getPositionX() - 1);
}
function goRight() {
	$playerVar.setPositionX($playerVar.getPositionX() + 1);
}
function goDown() {
	$playerVar.setPositionY($playerVar.getPositionY() + 1);
}